import Vue from 'vue'
import App from './App.vue'
import Vuetify from 'vuetify'
import zhHans from 'vuetify/es5/locale/zh-Hans'
import Vuelidate from 'vuelidate'
import Api from './api/index'
import 'vuetify/dist/vuetify.css'
import 'material-design-icons-iconfont/dist/material-design-icons.css'

import router from './router'
import store from './store'
import * as custom from './common/fitters/custom'


// 注册全局过滤器
Object.keys(custom).forEach(key => {
  Vue.filter(key, custom[key])
})

Vue.use(Vuelidate)
Vue.use(Vuetify,{
  lang: {
    locales: { zhHans },
    current: 'zhHans'
  }
})

Vue.prototype.$api = Api

new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
})
